/*  
	------------------------------------------------------------------------
	 NQ Core Library
	
	 Homepage: http://www.awzhome.de/
	------------------------------------------------------------------------
	
	This Source Code Form is subject to the terms of the Mozilla Public
	License, v. 2.0. If a copy of the MPL was not distributed with this
	file, You can obtain one at http://mozilla.org/MPL/2.0/.
   
	The Original Code is code of NQ Core Library.

	The Initial Developer of the Original Code is Andreas Weizel.
	Portions created by the Initial Developer are
	Copyright (C) 2012 Andreas Weizel. All Rights Reserved.
	
	Contributor(s): (none)
	
	------------------------------------------------------------------------
*/

using AWZhome.NQ.Core;

namespace AWZhome.NQ.Core.Tests
{
	internal interface ITestServiceType
	{
	}

	internal class TestServiceTypeSimple : ITestServiceType
	{
		public TestServiceTypeSimple()
		{
		}
	}

	internal class TestServiceTypeSimple1 : TestServiceTypeSimple
	{
	}

	internal class TestServiceTypeSimple2 : TestServiceTypeSimple
	{
	}

	internal class TestServiceTypeSimple3 : TestServiceTypeSimple
	{
	}

	internal class TestServiceTypeSubst1
	{
		public TestServiceTypeSubst1()
		{
		}
	}

	internal class TestServiceTypeSubst2 : TestServiceTypeSubst1
	{
		public TestServiceTypeSubst2()
		{
		}
	}

	internal class TestServiceTypeSubst3 : TestServiceTypeSubst2
	{
		public TestServiceTypeSubst3()
		{
		}
	}

	internal class TestServiceTypeInitLockConsumer<T>
	{
		public TestServiceTypeInitLockConsumer()
		{
			object testService = NQServiceManager.Instance.GetService<object>(typeof(T));
		}
	}

	internal class TestServiceTypeChild
	{
		public TestServiceTypeChild(object parentServ)
		{
			this.ParentService = parentServ;
		}

		public object ParentService
		{
			get;
			private set;
		}
	}

	internal class TestServiceTypeChild1 : TestServiceTypeChild
	{
		public TestServiceTypeChild1(object parentServ)
			: base(parentServ)
		{
		}
	}

	internal class TestServiceTypeChild2 : TestServiceTypeChild
	{
		public TestServiceTypeChild2(object parentServ)
			: base(parentServ)
		{
		}
	}

	internal class TestServiceTypeChild3 : TestServiceTypeChild
	{
		public TestServiceTypeChild3(object parentServ)
			: base(parentServ)
		{
		}
	}

	internal class TestServiceTypeChildProprietary : INQDependentService<TestServiceTypeSimple>
	{
		public TestServiceTypeSimple ParentService
		{
			get;
			private set;
		}

		#region INQDependentService<TestServiceTypeSimple> Member

		public void InitDependent(TestServiceTypeSimple parent)
		{
			this.ParentService = parent;
		}

		#endregion

		#region INQService Member

		public void InitService()
		{

		}

		public void DestroyService()
		{

		}

		#endregion
	}

	internal class TestServiceTypeInvokableProprietary : INQInvokableService
	{
		public bool OperationPerforming
		{
			get;
			set;
		}

		#region INQInvokableService Member

		public void InvokeService()
		{
			this.OperationPerforming = true;
		}

		public void QuitService()
		{
			this.OperationPerforming = false;
		}

		#endregion

		#region INQService Member

		public void InitService()
		{
		}

		public void DestroyService()
		{
		}

		#endregion
	}

	internal class TestServiceTypeInvokable
	{
		public bool OperationPerforming
		{
			get;
			set;
		}

		[NQServiceInvokeMethod]
		public void InvokeService()
		{
			this.OperationPerforming = true;
		}

		[NQServiceQuitMethod]
		public void QuitService()
		{
			this.OperationPerforming = false;
		}
	}

	internal class TestServiceTypeAutoInjection<T>
	{
		public T Injection
		{
			get;
			set;
		}

		public TestServiceTypeAutoInjection(T injection)
		{
			this.Injection = injection;
		}
	}

	internal class TestServiceTypeAutoInjection1<T>
	{
		public T Injection
		{
			get;
			set;
		}

		public TestServiceTypeAutoInjection1(T injection)
		{
			this.Injection = injection;
		}
	}

	internal class TestServiceTypeAutoInjection2<T1, T2>
	{
		public T1 Injection1
		{
			get;
			set;
		}
		public T2 Injection2
		{
			get;
			set;
		}

		public TestServiceTypeAutoInjection2(T1 injection1, T2 injection2)
		{
			this.Injection1 = injection1;
			this.Injection2 = injection2;
		}
	}

	internal class TestServiceTypeCyclic1
	{
		public TestServiceTypeCyclic1()
		{
		}
	}

	internal class TestServiceTypeCyclic2
	{
		public TestServiceTypeCyclic2()
		{
		}
	}
}
